
import React from 'react';
import { Button } from 'antd';
import { MoonOutlined, SunOutlined } from '@ant-design/icons';
import {useTheme} from "@/contexts/ThemeContext.tsx";



const ThemeButton: React.FC = () => {
    const { theme, toggleTheme } = useTheme();

    return (
        <Button
            type="text"
            icon={theme === 'dark' ? <SunOutlined /> : <MoonOutlined />}
            onClick={toggleTheme}
            style={{
                fontSize: '16px',
                width: 40,
                height: 40,
                color: theme === 'dark' ? '#fff' : '#000'
            }}
        />
    );
};

export default ThemeButton;
